package com.autohammal.factory;

import java.util.Date;

import com.autohammal.ITarget;
import com.autohammal.Monitor;
import com.autohammal.monitor.SchedulerMonitor;
import com.autohammal.monitor.scheduler.Scheduler;

public class MonitorFactory {

	public static Monitor createMonitor(ITarget target) {
		return new SchedulerMonitor(target, SchedulerFactory.makeScheduler(1000, 1000));
	}

	public static Monitor createMonitor(ITarget target, Scheduler scheduler) {
		return new SchedulerMonitor(target, scheduler);
	}

	public static Monitor createMonitor(ITarget target, long first, long period) {
		return new SchedulerMonitor(target,
				SchedulerFactory.makeScheduler(first, period));
	}

	public static Monitor createMonitor(ITarget target, Date startDate,
			long period) {
		return new SchedulerMonitor(target, SchedulerFactory.makeScheduler(startDate,
				period));
	}

}
